import { Module, forwardRef } from '@nestjs/common';
import { UserService } from './user.service';
import { UserController } from './user.controller';
import { jwtConstants, signOptions } from 'src/common/auth/constants';
import { JwtModule } from '@nestjs/jwt';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserEntity } from 'src/modules/admin/user/entities/user.entity';
import { UserJwtStrategy } from 'src/common/auth/userJwt.strategy';

@Module({
  imports: [
    TypeOrmModule.forFeature([UserEntity,]),
    JwtModule.register({
      secret: jwtConstants.secret,
      signOptions,
    }),
  ],
  controllers: [UserController],
  providers: [UserService, UserJwtStrategy],
  exports: [UserService]
})
export class UserModule { }
